" VimL虚拟机综合测试
" 测试当前支持的所有功能

" 1. 基本变量和运算
let a = 10
let b = 20
let c = a + b
echo "基本运算: 10 + 20 = " . c

" 2. 字符串操作
let name = "VimL"
let greeting = "Hello " . name
echo greeting

" 3. 条件判断
let x = 15
if x > 10
    echo "x大于10"
elseif x == 10
    echo "x等于10"
else
    echo "x小于10"
endif

" 4. 循环结构（模拟for循环）
let counter = 0
while counter < 5
    echo "计数器: " . counter
    let counter = counter + 1
endwhile

" 5. 嵌套循环
let outer = 0
while outer < 3
    let inner = 0
    while inner < 2
        echo "外层:" . outer . " 内层:" . inner
        let inner = inner + 1
    endwhile
    let outer = outer + 1
endwhile

echo "综合测试完成"